<div class="post_title">
<h1>編輯</h1>
</div>
<div class="post_body">
<p>你可以在這裏編輯圖片.</p>

<?php $this->load->view('admin/partials/notices') ?>
<table width="100%">
	<tr>
		<td colspan="2">
		<fieldset id="edit"><legend>基本資料</legend>
		<table>

			<tr>
				<td valign="top" colspan="2" align="center">
				<img src="<?php echo gallery_url($gallery->path,'small')?>" /></td>
			</tr>
			<tr>
				<form action="<?php echo site_url('admin/galleries/edit_gallery');?>"
					method="post" enctype="multipart/form-data">
				<td width="80px">換圖片</td>
				<td><input type="file" name="userfile" id="title" /></td>
			
			</tr>
			<tr>
				<td width="80px">標題</td>
				<td><input type="text" name="title" value="<?php echo $gallery->title;?>" id="title"
					class="styled" size="60" /></td>
			
			</tr>
			<tr>
				<td width="80px" valign="top">狀態</td>

				<td><select name="status">
					<option value="published" <?php if("published" == $gallery->status):?>selected="selected"<?php endif;?>>審核</option>
					<option value="draft" <?php if("draft" == $gallery->status):?>selected="selected"<?php endif;?>>未審核</option>
				</select> <a title="作品狀態|作品有兩種狀態:<br /><br />
							<strong>審核</strong> - 在網站中顯示<br />
							<strong>未審核</strong> - 在網站中不顯示"
												class="tip">[?]</a></td>
			</tr>
			<tr>
				<td width="80px" valign="top">分類</td>
				<td><select name="category">
					<?php foreach($categories as $category):?>
					<option value="<?php echo $category->id;?>" <?php if($category->id == $gallery->category_id):?>selected="selected"<?php endif;?>><?php echo $category->name;?></option>
					<?php endforeach;?>
				</select></td>
			</tr>
			<tr>
				<td width="80px" valign="top">圖片位置</td>
				<td><input type="text" name="position" value="<?php echo $gallery->votenum?>" id="position" size="6" class="styled"  /></td>
			</tr>
			<tr>
				<td width="80px" valign="top">內容</td>
				<td><textarea rows="3" cols="57" name="description"><?php echo $gallery->description;?></textarea>		
			</td>
			</tr>
		</table>
		</fieldset>
		</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2"><input type="hidden" name="id" value="<?php echo $gallery->id;?>" /> <input
			type="submit" name="submit" value="編輯 &rsaquo;&rsaquo;"
			class="styled" />

		</form>
		</td>
	</tr>
</table>
</div>